using System;
using System.Runtime.Serialization;

namespace Comdiv.QWeb.Serialization.BxlParser {
	[Serializable]
	public class BxlParserException : Exception {
		//
		// For guidelines regarding the creation of new exception types, see
		//    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp
		// and
		//    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp
		//

		public BxlParserException(BxlLexInfo lexinfo = new BxlLexInfo()) {
			LexInfo = lexinfo;
		}

		public BxlParserException(string message, BxlLexInfo lexinfo = new BxlLexInfo())
			: base(message) {
			LexInfo = lexinfo;
		}

		public BxlParserException(string message, Exception inner, BxlLexInfo lexinfo = new BxlLexInfo())
			: base(message, inner) {
			LexInfo = lexinfo;
		}

		protected BxlParserException(
			SerializationInfo info,
			StreamingContext context) : base(info, context) {
		}

		public BxlLexInfo LexInfo { get; protected set; }
	}
}